<template>
    <div>
        <myheader/>
        <van-field
            v-model="form.name"
            name="name"
            label="名称"
            placeholder="名称"
            :rules="[{ required: true, message: '请填写名称' }]"
        />
         <van-field
            v-model="form.level"
            name="level"
            label="等级"
            placeholder="等级"
            :rules="[{ required: true, message: '请填写等级' }]"
        />
        <van-field
            v-model="form.params"
            name="params"
            label="参数"
            placeholder="参数"
        />
        <van-button color="linear-gradient(to right, #7232dd, #ffffff)" @click="add" style="width:200px">
                提交
        </van-button>
    </div>
</template>

<script>
import myheader from '@/components/myheader'
    export default {
        data(){
            return{
                form:{parent:0},
            }
        },
        methods:{
            add(){
                this.$axios.post('course/cateM',this.form)
                .then(res=>{
                    
                })
            },
        },
        mounted:{},
        //注册头部
        components:{
            'myheader':myheader
        },
    }
</script>

<style scoped>

</style>